efa policy prefix-list update

Configures prefix list rules on specified devices.

Syntax

efa policy prefix-list update [ --type string | --name list name | --operation { add-rule | remove-rule | add-device | remove-device } | --rule stringArray | --ip string ]

Parameters

--type string
Specifies the type of prefix list. Valid type is [ipv4 |ipv6] .
--name list name
Specifies the name of the prefix list.
--operation { add-rule | remove-rule | add-device | remove-device }
Specifies the operation to perform.
--rule stringArray
Specifies the rule of the prefix list, in the following format: seq[seq-num], action[permit/deny], prefix [IPv4 prefix|IPv6 prefix],ge[prefix-len],le[prefix-len]. Example: seq [5], action[permit], prefix [10.0.0.0/8|2001:db8: :/32],ge[10], le[24].
--ip string
Specifies a comma-separated range of device IP addresses. For example: 10.1.1.13,10.1.1.50,10.1.1.101.

Usage Guidelines

Examples

This example configures a prefix list on the specified devices.

efa policy prefix-list update --type ipv6 --name prefix_1_in --operation add-device 
--ip 10.20.246.29-30 
+-------------+------+---------+--------+---------------+----+----+ 
|    Name     | Type | Seq num | Action |    Prefix     | Ge | Le | 
+-------------+------+---------+--------+---------------+----+----+ 
| prefix_1_in | ipv6 | 11      | permit | 2001:db8::/48 |    |    | 
+-------------+------+---------+--------+---------------+----+----+ 
Prefix-list details 
+--------------+---------+--------+ 
|  IP Address  | Result  | Reason | 
+--------------+---------+--------+ 
| 10.20.246.29 | Success |        | 
+--------------+---------+--------+ 
| 10.20.246.30 | Success |        | 
+--------------+---------+--------+ 
Device Results 

This example removes the prefix list from the specified devices.

efa policy prefix-list update –-name prefix_v4 –-type ipv4 
–-operation remove-device --ip 10.20.246.10-11

This example adds a rule to an existing prefix list.

efa policy prefix-list update --type ipv6 --name prefix_1_in 
--rule "seq[11],action[permit],prefix[2001:db8::/48],ge[64],le[128]" --operation add-rule 
+-------------+------+---------+--------+---------------+----+-----+ 
|    Name     | Type | Seq num | Action |    Prefix     | Ge | Le  | 
+-------------+------+---------+--------+---------------+----+-----+ 
| prefix_1_in | ipv6 | 13      | permit | 2001:db8::/32 | 48 | 128 | 
+-------------+------+---------+--------+---------------+----+-----+ 
| prefix_1_in | ipv6 | 14      | permit | 2003:db8::/32 | 64 | 128 | 
+-------------+------+---------+--------+---------------+----+-----+ 
| prefix_1_in | ipv6 | 15      | deny   | 2003:db8::/63 | 64 | 128 | 
+-------------+------+---------+--------+---------------+----+-----+ 
| prefix_1_in | ipv6 | 11      | permit | 2001:db8::/48 | 64 | 128 | 
+-------------+------+---------+--------+---------------+----+-----+ 
Prefix-list details 
+--------------+---------+--------+ 
|  IP Address  | Result  | Reason | 
+--------------+---------+--------+ 
| 10.20.246.29 | Success |        | 
+--------------+---------+--------+ 
| 10.20.246.30 | Success |        | 
+--------------+---------+--------+ 
Device Results 

This example removes a rule from an existing prefix list.

efa policy prefix-list update –-name prefix_v4 
–-type ipv4 –-operation remove-rule 
–-rule seq[5],action[permit],prefix[10.0.0.0/8],ge[16]
This example configures an IPv6 prefix list on the specified devices.
efa policy prefix-list update --type ipv6 --name prefix_1_in 
--operation add-device --ip 10.20.246.29-30 
+-------------+------+---------+--------+---------------+----+----+ 
|    Name     | Type | Seq num | Action |    Prefix     | Ge | Le | 
+-------------+------+---------+--------+---------------+----+----+ 
| prefix_1_in | ipv6 | 11      | permit | 2001:db8::/48 |    |    | 
+-------------+------+---------+--------+---------------+----+----+ 
Prefix-list details 
+--------------+---------+--------+ 
|  IP Address  | Result  | Reason | 
+--------------+---------+--------+ 
| 10.20.246.29 | Success |        | 
+--------------+---------+--------+ 
| 10.20.246.30 | Success |        | 
+--------------+---------+--------+ 
Device Results 
This example adds a rule to an existing IPv6 prefix list.
efa policy prefix-list update --type ipv6 --name prefix_1_in 
--rule "seq[11],action[permit],prefix[2001:db8::/48],ge[64],le[128]" 
--operation add-rule 
+-------------+------+---------+--------+---------------+----+-----+ 
|    Name     | Type | Seq num | Action |    Prefix     | Ge | Le  | 
+-------------+------+---------+--------+---------------+----+-----+ 
| prefix_1_in | ipv6 | 13      | permit | 2001:db8::/32 | 48 | 128 | 
+-------------+------+---------+--------+---------------+----+-----+ 
| prefix_1_in | ipv6 | 14      | permit | 2003:db8::/32 | 64 | 128 | 
+-------------+------+---------+--------+---------------+----+-----+ 
| prefix_1_in | ipv6 | 15      | deny   | 2003:db8::/63 | 64 | 128 | 
+-------------+------+---------+--------+---------------+----+-----+ 
| prefix_1_in | ipv6 | 11      | permit | 2001:db8::/48 | 64 | 128 | 
+-------------+------+---------+--------+---------------+----+-----+ 
Prefix-list details 
+--------------+---------+--------+ 
|  IP Address  | Result  | Reason | 
+--------------+---------+--------+ 
| 10.20.246.29 | Success |        | 
+--------------+---------+--------+ 
| 10.20.246.30 | Success |        | 
+--------------+---------+--------+ 
Device Results